package com.hhf.feicodebackend.ai;

import com.hhf.feicodebackend.ai.model.result.HtmlCodeResult;
import com.hhf.feicodebackend.ai.model.result.MultiFileCodeResult;
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import reactor.core.publisher.Flux;

/**
 * @Author hhf
 * @Date 2025/8/11
 * @Description
 */
public interface AiCodeGeneratorService {

    /**
     * 生成html代码
     * @param userMessage 用户提示词
     * @return
     */
    @SystemMessage(fromResource = "prompt/codegen-html-system-prompt.txt")
    HtmlCodeResult generateHtmlCode(@UserMessage String userMessage);

    /** 生成多文件代码
     * @param userMessage 用户提示词
     * @return
     */
    @SystemMessage(fromResource = "prompt/codegen-multi-file-system-prompt.txt")
    MultiFileCodeResult generateMultiFileCode(@UserMessage String userMessage);

    /**
     * 生成html代码(流式)
     * @param userMessage 用户提示词
     * @return
     */
    @SystemMessage(fromResource = "prompt/codegen-html-system-prompt.txt")
    Flux<String> generateHtmlCodeStream(@UserMessage String userMessage);

    /** 生成多文件代码(流式)
     * @param userMessage 用户提示词
     * @return
     */
    @SystemMessage(fromResource = "prompt/codegen-multi-file-system-prompt.txt")
    Flux<String> generateMultiFileCodeStream(@UserMessage String userMessage);



}
